:root {
    --primary-color: #4a6bdf;
    --secondary-color: #3a56b2;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #777;
    --white: #fff;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --section-spacing: 2rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-gray);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s;
}

a:hover {
    color: var(--secondary-color);
    transform: translateY(-1px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: var(--white);
    padding: 2rem;
    margin-bottom: var(--section-spacing);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
}

.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
    flex: 1;
    min-width: 250px;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s;
}

.profile-img:hover {
    transform: scale(1.05);
}

.profile h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.profile p {
    font-size: 1.1rem;
    color: var(--dark-gray);
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    display: inline-block;
}

.contact-info {
    flex: 1;
    min-width: 250px;
    padding: 1.5rem;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-info p {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
}

.contact-info i {
    margin-right: 10px;
    width: 20px;
    color: var(--primary-color);
}


.section {
    background-color: var(--white);
    padding: 2rem;
    margin-bottom: var(--section-spacing);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s;
}

.section:hover {
    transform: translateY(-5px);
}

.section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--medium-gray);
    font-size: 1.5rem;
}

.content {
    margin-bottom: 1.5rem;
}

.content:last-child {
    margin-bottom: 0;
}

.content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.content p {
    margin-bottom: 0.5rem;
}

.content ul {
    list-style-position: inside;
    padding-left: 0;
}

.content li {
    margin-bottom: 0.5rem;
}

.skills {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.skill-item {
    background: var(--light-gray);
    padding: 15px;
    border-radius: var(--border-radius);
    transition: all 0.3s;
}

.skill-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.skill-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 16px;
}

.skill-item ul {
    list-style: none;
}

.skill-item li {
    margin-bottom: 6px;
}

.skill-item li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
}

.courses-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.course-card {
    background: var(--light-gray);
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.course-card:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.course-card i {
    margin-right: 8px;
}

.self-intro {
    padding: 1.5rem;
    background: var(--light-gray);
    border-radius: var(--border-radius);
}

footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

/* 优化移动端布局 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .profile, .contact-info {
        width: 100%;
    }

    .contact-info {
        margin-top: 1.5rem;
        padding: 1rem;
    }

    .section {
        padding: 1.5rem;
    }

    .skills {
        grid-template-columns: 1fr;
    }

    .course-card {
        flex: 1 0 calc(50% - 1rem);
    }
}

@media (max-width: 480px) {
    .profile-img {
        width: 120px;
        height: 120px;
    }

    .profile h1 {
        font-size: 1.8rem;
    }

    .section {
        padding: 1.2rem;
    }

    .section h2 {
        font-size: 1.3rem;
    }

    .course-card {
        width: 100%;
    }

    .content h3 {
        font-size: 1.1rem;
    }

    .contact-info p {
        font-size: 0.9rem;
    }
}

/* 基础样式保持不变，新增以下打印相关样式 */
@media print {
    body {
        background: none;
        color: #000;
        font-size: 12pt;
    }
    
    .container {
        width: 100%;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
    
    header, section, footer {
        break-inside: avoid;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
    
    .no-print {
        display: none !important;
    }
    
    .profile-img {
        width: 80px;
        height: 80px;
    }
}

.print-button {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 15px;
    background-color: #6b83a3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.print-button:hover {
    background-color: #6b83a3;
}    
@media print {
    .section:has(h2:contains('技能专长')) {
         display: grid;
         grid-template-columns: repeat(2, 1fr);
         grid-template-rows: repeat(2, auto);
         gap: 15px; /* 增大模块间距，让布局更舒展 */
     }
    .skill-item {
         border: 1px solid #ccc;
         padding: 12px; /* 增大内边距，让内容不那么紧凑 */
         border-radius: 8px; /* 增大圆角弧度，更美观柔和 */
         display: flex;
         flex-direction: column;
         justify-content: flex-start;
     }
    .skill-item h3 {
         font-size: 14pt; /* 增大标题字号 */
         margin-bottom: 8px; /* 增大标题与内容间距 */
     }
    .skill-item li {
         font-size: 12pt; /* 增大列表项字号 */
         margin-bottom: 5px; /* 增大列表项间距 */
     }
 }